import request from '@/utils/request';
export async function notificationTemplate() {
  const res = await request.get('/massage/notificationTemplate/get');
  if (res.data.code === 200) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

export async function notificationTemplateIdList(id) {
  const res = await request.get('/massage/notificationTemplate/idList/' + id);
  if (res.data.code === 200) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

export async function notificationTempBatchSave(data) {
  const res = await request.post('/massage/notificationTemplate/batch', data);
  if (res.data.code === 200) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.message));
}
export async function notificationTemplateGet() {
  const res = await request.get('/massage/notificationTemplate');
  if (res.data.code === 200) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
export async function notificationTemplateModify(data) {
  const res = await request.put('/massage/notificationTemplate/update', data);
  if (res.data.code === 200) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
